﻿using WebAPI.Util;
using System.ComponentModel.DataAnnotations;

namespace WebAPI.Models;

public class GetPlatformAccountListRequest : BasePageInput
{
    [MaxLength(200, ErrorMessage = "AccountName Max Length Error")]
    public string? AccountName { get; set; }
    [MaxLength(200, ErrorMessage = "LoginName Max Length Error")]
    public string? LoginName { get; set; }
    [MaxLength(250, ErrorMessage = "Email Max Length Error")]
    public string? Enable { get; set; } = null;
}

public class GetPlatformAccountListResponse
{
    public Guid AccountID { get; set; }
    public string? AccountName { get; set; }
    public string LoginName { get; set; }
    public string? Email { get; set; }
    public bool Enable { get; set; }
    public string CreateUser { get; set; }
    public string CreateDate { get; set; }
    public string UpdateUser { get; set; }
    public string UpdateDate { get; set; }
}

public class UpdatePlatformAccountRequest
{
    [Required(ErrorMessage = "AccountId is required")]
    public Guid AccountId { get; set; }

    [MaxLength(200, ErrorMessage = "Platform AccountName Max Length Error")]
    public string? AccountName { get; set; }

    [MaxLength(255, ErrorMessage = "Email Max Length Error")]
    public string? Email { get; set; }

    [MaxLength(50, ErrorMessage = "Password Max Length Error")]
    public string? Password { get; set; }

    [MaxLength(50, ErrorMessage = "ConfirmPassword Max Length Error")]
    public string? ConfirmPassword { get; set; }

    public bool Enable { get; set; }
}

public class AddPlatformAccountRequest
{
    [MaxLength(200, ErrorMessage = "AccountName Max Length Error")]
    public string? AccountName { get; set; }

    [Required(ErrorMessage = "LoginName is required")]
    [MaxLength(200, ErrorMessage = "LoginName Max Length Error")]
    public string LoginName { get; set; }

    [MaxLength(255, ErrorMessage = "Email Max Length Error")]
    public string? Email { get; set; }

    [Required(ErrorMessage = "Password is required")]
    [MaxLength(50, ErrorMessage = "Password Max Length Error")]
    public string Password { get; set; }

    [Required(ErrorMessage = "ConfirmPassword is required")]
    [MaxLength(50, ErrorMessage = "ConfirmPassword Max Length Error")]
    public string ConfirmPassword { get; set; }

    public bool Enable { get; set; }
}

public class DeletePlatformAccountRequest
{
    [Required(ErrorMessage = "AccountId is required")]
    public List<Guid> AccountIds { get; set; }
    [Required(ErrorMessage = "Enable is required")]
    public bool Enable { get; set; }
}

public class EnablePlatformAccountRequest
{
    [Required(ErrorMessage = "AccountId is required")]
    public string accountIds{ get; set; }

    public bool enable { get; set; }

}

